package com.pactera.miyuangroup;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.net.InetAddress;
import java.net.UnknownHostException;

@SpringBootApplication
@EnableScheduling
@Slf4j
public class MiYuanGroupApplication {

    public static void main(String[] args) throws UnknownHostException {
        ConfigurableApplicationContext application = SpringApplication.run(MiYuanGroupApplication.class, args);
        log.info("项目启动成功!");
        Environment env = application.getEnvironment();
        log.info("接口文档地址： http://{}:{}/swagger-ui.html", InetAddress.getLocalHost().getHostAddress(), env.getProperty("server.port"));
        log.info("接口文档地址： http://{}:{}/doc.html", InetAddress.getLocalHost().getHostAddress(), env.getProperty("server.port"));
    }
}
